Route shell commands through PowerShell -EncodedCommand to fix paths with spaces - #712
Conversation
linghengqian
left a comment
There was a problem hiding this comment.
CC @Chance-fyi @aooohan @bytemain . Could you help approve the CI run?
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The Windows Lua overrides break existing shell and file-handle contracts and contain incorrect pipe, EOF, and status handling.
Review effort: Balanced
Findings: 1
Open (4)
What changed in this PR
Routes Windows shell execution through PowerShell encoded commands to support paths containing spaces.
Changes:
- Adds shared encoded PowerShell execution helpers.
- Updates junctions, upgrades, shims, and Lua command execution.
- Adds Windows-focused regression tests.
| File | Description |
|---|---|
internal/shared/util/shell.go |
Adds cross-platform shell helpers. |
internal/shared/util/shell_test.go |
Tests command encoding and construction. |
internal/shared/util/file.go |
Creates Windows junctions through PowerShell. |
internal/shared/util/file_windows_test.go |
Tests junction paths containing spaces. |
internal/shared/shim/shim_windows.go |
Escapes paths in generated shims. |
internal/plugin/luai/vm.go |
Installs Windows Lua execution overrides. |
internal/plugin/luai/exec.go |
Implements overridden Lua process APIs. |
internal/plugin/development_output.go |
Uses the shared shell helper in development mode. |
cmd/commands/upgrade.go |
Launches the upgrade script through PowerShell. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Where is CI... I remember there was one before. |
linghengqian
left a comment
There was a problem hiding this comment.
Could you help approve the CI run?
Where is CI... I remember there was one before.
- I’ve opened #713; I will address the review comments on the current PR after that one is merged.
db28236 to
22bb01e
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #712 +/- ##
==========================================
- Coverage 35.09% 35.00% -0.09%
==========================================
Files 92 95 +3
Lines 6514 6702 +188
==========================================
+ Hits 2286 2346 +60
- Misses 3922 4043 +121
- Partials 306 313 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
22bb01e to
96f9c8f
Compare



-EncodedCommandto fix paths with spaces.